package com.ethink.system.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.system.api.info.SystemApiAuthorityInfo;
import com.ethink.system.api.request.SystemApiAuthorityAddRequest;
import com.ethink.system.api.request.SystemApiAuthorityQueryRequest;
import com.ethink.system.api.request.SystemApiAuthorityUpdateRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统接口权限表 Facade接口
 *
 * @author default
 * @date 2022-09-26
 */
@FeignClient(name = "ethink-system-service", path = "system-service/facade/v1/systemApiAuthority", contextId = "systemApiAuthorityFacade")
public interface SystemApiAuthorityFacade {

    @PostMapping("/systemApiAuthority/list")
    @ResponseBody
    Page<SystemApiAuthorityInfo> getSystemApiAuthorityList(@RequestBody SystemApiAuthorityQueryRequest request);

    @GetMapping("/systemApiAuthority/detail")
    @ResponseBody
    SystemApiAuthorityInfo getSystemApiAuthorityById(@RequestParam("systemApiAuthorityId") Long systemApiAuthorityId);

    @PostMapping("/systemApiAuthority/add")
    @ResponseBody
    void addSystemApiAuthority(@RequestBody SystemApiAuthorityAddRequest request);

    @PostMapping("/systemApiAuthority/update")
    void updateSystemApiAuthority(@RequestBody SystemApiAuthorityUpdateRequest request);

    @GetMapping("/systemApiAuthority/delete")
    void deleteSystemApiAuthority(@RequestParam("systemApiAuthorityId") Long systemApiAuthorityId);

}